﻿using System;
using System.Collections.Generic;
using System.Text;
using Surging.Core.Common;
using Surging.Core.CPlatform.Ioc;
using Surging.Core.CPlatform.Runtime.Server.Implementation.ServiceDiscovery.Attributes;
using Dora.Services.AdminUser.Dto.QueryDto;
using Dora.Services.AdminUser.Dto.SaveDto;
using Dora.Services.AdminUser.Entities;
using Dora.Tools.Utility.Const;
using System.Threading.Tasks;


namespace Dora.Services.AdminUser.IApplication
{
    /// <summary>
    /// 微信小程序主题服务
    /// </summary>
    [ServiceBundle("api/" + DoraModuleName.AdminUser + "/{Service}")]
    public interface IOrgWxMPThemeService : IServiceKey
    {

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "创建")]
        Task<ResultDto<int>> Create(OrgWxMPThemeEntity entity);

        /// <summary>
        /// 根据主键获取信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "创建")]
        Task<OrgWxMPThemeEntity> GetById(int id);

        /// <summary>
        /// 获取分页信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "创建")]
        Task<PageDataList<OrgWxMPThemeEntity>> GetPageList(OrgWxMPThemeQueryDto input);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "修改")]
        Task<bool> Update(OrgWxMPThemeEntity entity);

        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "根据IdList获取列表")]
        Task<List<OrgWxMPThemeEntity>> GetList(List<int> idList);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-25", Director = "ZPD", Name = "删除")]
        Task<ResultDto<bool>> Delete(OrgWxMPThemeEntity entity);


        /// <summary>
        /// 根据组织机构集合添加信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-27", Director = "ZPD", Name = "根据组织机构集合添加信息")]
        Task<ResultDto<int>> CreateByOrgIds(OrgWxThemeSaveDto input);

        /// <summary>
        /// 复制主题到某个组织机构
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-27", Director = "ZPD", Name = "复制主题到某个组织机构")]
        Task<ResultDto<int>> CopyToOrg(OrgWxThemeCopyDto input);

        /// <summary>
        /// 根据IdList获取列表
        /// </summary>
        /// <param name="OrgId"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-27", Director = "ZPD", Name = "复制主题到某个组织机构")]
        Task<List<OrgWxMPThemeEntity>> GetListByOrgId(int OrgId);
        /// <summary>
        /// 根据主题值获取主题信息
        /// </summary>
        /// <param name="themeKey"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-27", Director = "ZPD", Name = "根据主题值获取主题信息")]
        Task<OrgWxMPThemeEntity> GetByKey(string themeKey);

        /// <summary>
        /// 设置为当前主题
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Service(Date = "2019-09-27", Director = "ZPD", Name = "设置为当前主题")]
        Task<ResultDto<bool>> SetOrgTheme(OrgSettingThemeSaveDto input);
    }
}
